-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support stripping metadata from updates. #25
Conversation
6a6db32
to
8b8d15d
Compare
Updates metadata can be quite large and cause systems with low memory to OOM refreshing it. Add support for dropping from the metadata architectures that are not in use in any system the mirror serves. This is achieved in much the same way as snapshotting is implemneted: pull metadata, rewrite, update the various values like checksum and size so DNF is happy to consume it and add to repomd.xml. Some refactoring was performed as much of the code used for snapshotting is also useful here.
8b8d15d
to
510cc59
Compare
Follow on from previous commit and support stripping xz metadata also.
510cc59
to
40654a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - I can't lie, tests would be great... but let's see if we can get this sucker to prod and if it help sad services
target_arches: Tuple[str], | ||
scratch_dir: str, | ||
): | ||
sync_files, upload_files = [], [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: sync_files is never modified, which makes mypy sad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might see about adding mypy lint step and adding proper typing.
Updates metadata can be quite large and cause systems with low memory to
OOM refreshing it. Add support for dropping from the metadata
architectures that are not in use in any system the mirror serves. This
is achieved in much the same way as snapshotting is implemneted: pull
metadata, rewrite, update the various values like checksum and size so
DNF is happy to consume it and add to repomd.xml.
Some refactoring was performed as much of the code used for snapshotting
is also useful here.